<script setup lang="ts">
import $bus from "@/bus";
import {onMounted} from "vue";
import {ref} from "vue";

let received: any=ref('没收到')
onMounted(() => {
  $bus.on("update", (args: any) => {
    console.log(args);
    received = args;
  })
})
</script>

<template>
  <div class="container">
    收到：
    {{received}}
  </div>
</template>

<style scoped>
.container {
  width: 400px;
  height: 200px;
  background: hotpink;
}
</style>